import { constantRoutes } from '@/router/index'

const state = {
  routes: constantRoutes
}

const mutations = {
  setRoute(state, payload) {
    state.routes = [...constantRoutes, ...payload] // 退出重新登录左侧的菜单有更新，但实际路由并没有
  }
}

export default {
  namespaced: true,
  state,
  mutations
}

